<%@ page session="false" language="java" pageEncoding="UTF-8" contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="ko">
<head>
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no,target-densitydpi=medium-dpi"/>
	<title>고누놀이 홈</title>
</head>
<body style=' -webkit-background-size: 100%;-moz-background-size: 100%;-o-background-size: 100%;background-size: 100%; background-attachment: fixed; background-repeat: no-repeat; background-image: url("/img/home.jpg")'>
<div style="position: relative">
	<div id="container" style="font-size: 70px; font-family: 궁서체; margin-top:100px;color: #804040; text-align: center"><span>고누 놀이</span></div>
	<div style="bottom: 60px;position: fixed; width: 95%;">
		<button type="submit" onclick="javascript:goToPVP()" style="opacity:0.6;font-size: 20px;width: 100%; height: 50px; margin-bottom:10px;"><b>멀티플레이</b></button>
		<button type="submit" onclick="javascript:goToPVC()" style="opacity:0.6;font-size: 20px;width: 100%; height: 50px; margin-bottom:10px;"><b>싱글 플레이</b></button>
	</div>
</div>
</body>
<script src="${contextPath }/js/lib/kinetic-v4.4.3.js"></script>
<script type="text/javascript" charset="utf-8" src="${contextPath }/js/lib/jindo.all.js"></script>
<script type="text/javascript">
function goToPVP() {
	var name = inputName();
	if (name == null) {
		alert("이름을 입력해주세요");
		return;
	}
	location.href ="/gonu/play/chnlSelect.gonu?name="+name;
}

function goToPVC() {
	var name = inputName();
	if (name == null) {
		alert("이름을 입력해주세요");
		return;
	}
	location.href ="/gonu/play/chnlSelect.gonu?name="+name+"&isPvc=true";
}

function inputName() {
	var name = prompt("플레이어 이름을 3글자 이하로 입력해주세요\n 해당 이름은 게임 접속시에만 유효합니다.");
	if (name != '' && name != null && name.length > 3 ) {
		alert("올바른 이름이 아닙니다.");
	} else {
		return name;
	}
	
}

	

		
</script>
</html>
